import request from '@/utils/request';

// 获取该项目的任务列表
function getProTask(projectId) {
  return request({
    url: '/task/SelectProjectMyTask',
    method: 'GET',
    params: {
      projectId
    }
    // emulateJSON: true

  });
}
// 批量分配任务
function batchTask(data) {
  console.log(data);
  return request({
    url: '/task/batchProjectMyTask',
    method: 'POST',
    data
    // emulateJSON: true

  });
}
// 修改任务关系,修改顺序
function modifyTaskRelationship(order, parentId, projectId, taskId, type) {
  // console.log('传过来的数据', data);
  return request({
    url: '/task/updateProjectMyTask',
    method: 'POST',
    params: {order, parentId, projectId, taskId, type}
    // emulateJSON: true

  });
}
// 开始任务
function StartTask(params) {
  // console.log(params);
  return request({
    url: '/task/taskStart',
    method: 'GET',
    params
    // emulateJSON: true

  });
}
export {
  getProTask, batchTask, modifyTaskRelationship, StartTask
};
